using UnityEngine;

public class Attack : MonoBehaviour {

    public int damage;
    
    private void OnTriggerStay2D(Collider2D other)
    {
        //禁止自己攻击自己
        if(other.gameObject == transform.parent.gameObject) return;
        other.GetComponent<Character>()?.TakeDamage(this);
    }
}
